package com.java2207.group1.listener;


import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.java2207.group1.bo.DormBo;
;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @author :xs
 * @date : 2022/7/28
 */
@Component
@Scope("prototype")    //设置成多例模式
public class DormBoReadListener extends AnalysisEventListener<DormBo> {

    @Override
    public void invoke(DormBo dormBo, AnalysisContext analysisContext) {
        System.out.println(dormBo);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("文件解析完");
    }
}



